package com.ice.work.organization.facadeuser.controller;


import com.honeybee.cloud.framework.base.exception.business.BaseBizException;
import com.honeybee.cloud.framework.common.response.ResponseEntity;
import com.ice.work.organization.facadeuser.request.AddUserRequest;
import com.ice.work.organization.facadeuser.controller.fallback.UserHystrixFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Description 用户
 * @Author DELL
 * @Create 2019-04-29
 * @Since 1.0.0
 */
@FeignClient(value = "organization-user-v1", fallbackFactory = UserHystrixFallbackFactory.class)
@RequestMapping("organization-user")
public interface IUserController {
    /**
     * 新增用户
     *
     * @param request
     * @return
     * @throws BaseBizException
     */
    @RequestMapping(name = "新增用户", value = "v1/add-user", method = RequestMethod.POST)
    ResponseEntity<Void> addUser(@RequestBody @Validated AddUserRequest request) throws BaseBizException;
    /**
     * 查找用户详情
     *
     * @return
     * @throws BaseBizException
     */
    @RequestMapping(name = "查找用户详情", value = "find-user", method = RequestMethod.GET)
    ResponseEntity<Void> getUser() throws BaseBizException;
}
